<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Acount Model Config</title>
	
	<jsp:include page="/core/tool/resources.jsp?models=echarts"></jsp:include>
	<script src="./backreport.js"></script>
</head>
<body>

	<div id="toolbar">
	   <a class="easyui-linkbutton" iconCls="icon-reload" onclick="refresh()">刷新</a> 
       <a class="easyui-linkbutton" iconCls="icon-reload" onclick="refresh(true)">强制刷新</a>
    </div>

	<div style="height:5px"></div>
	<div id="panel" class="easyui-panel" title="策略配置" style="width:100%;" data-options="collapsible:true">
		<form id="modelconfig"  class="easyui-flexform" data-options="cellMargin:3,cellWidth:230">
			<div>
				<label>账户:</label>
				<div><input id="acountId" class="easyui-combobox"  name="acountId" 
		 			data-options="url:'../acount/allenabled.json',
		 				textField:'acountName',
		 				valueField:'acountId',
		 				onChange:changeAcount,
		 				loadFilter:function(data){return data.acounts},
		 				value:${acountId}"/></div>		 	
		 	</div>
			<div>
				<label>模型编码:</label>
				<div><input class="easyui-textbox" name="modelCode" /></div>
			</div>
			<div>
				<label>模型名称:</label>
				<div><input class="easyui-textbox" name="modelName" /></div>
			</div>
			<div>
				<label>开始日期:</label>
				<div><input class="easyui-datebox" name="startDate"/></div>
			</div>
			<div>
				<label>报告日期:</label>
				<div><input class="easyui-datebox" name="reportDateX"/></div>
			</div>
			<div>
				<label>回测周期:</label>
				<div><input class="easyui-textbox" name="reportDate"/></div>
			</div>
			<c:forEach items="${params}" var="item" varStatus="status">
				<div>
					<label>${item.paramName}:</label>
					<div><input class="easyui-textbox" name="${item.paramCode}"/></div>
				</div>
			</c:forEach>
			<div colspan="3">
				<label>股票列表:</label>
				<div><input class="easyui-textbox" name="secList" style="width:600px"/></div>
			</div>
		</form>  
	</div>

	<div style="height:5px"></div>
	<div id="panel" class="easyui-panel" title="风险分析" style="width:100%;" 	data-options="collapsible:true">
		<form id="risk"   class="easyui-flexform" data-options="cellMargin:3,cellWidth:180">
			<div>
				<label>收益:</label>
				<div><input class="easyui-numberbox" type="text" name="profit"  readonly="true" data-options="precision:2, measure:'percent'"/></div>
			</div>
			<div>
				<label>基准收益:</label>
				<div><input class="easyui-numberbox" type="text" name="baseProfit" readonly="true" data-options="precision:2, measure:'percent'"/></div>
			</div>
			<div>
				<label>年化收益:</label>
				<div><input class="easyui-numberbox" type="text" name="profitYear" readonly="true" data-options="precision:2, measure:'percent'"/></div>
			</div>
			<div>
				<label>超额收益:</label>
				<div><input class="easyui-numberbox" type="text" name="excessProfit" readonly="true" data-options="precision:2, measure:'percent'"/></div>
			</div>
			<div>
				<label>阿尔法:</label>
				<div><input class="easyui-numberbox" type="text" name="alpha" readonly="true" data-options="precision:2, measure:'percent'"/></div>
			</div>
			<div>
				<label>阿尔法12M:</label>
				<div><input class="easyui-numberbox" type="text" name="alpha12m" readonly="true" data-options="precision:2, measure:'percent'"/></div>
			</div>
			<div>
				<label>贝塔:</label>
				<div><input class="easyui-numberbox" type="text" name="beta" data-options="precision:2"/></div>
			</div>
			<div>
				<label>贝塔12M:</label>
				<div><input class="easyui-numberbox" type="text" name="beta12m" data-options="precision:2"/></div>
			</div>
		</form>  
	</div>

	<div style="height:5px"></div>
	<div id="profitPanel" class="easyui-panel" title="收益图" style="width:100%;" 	data-options="collapsible:true">
		<form id="requestForm" name="requestForm"  class="easyui-form">
			开始日期：<input class="easyui-datebox" name="beginDate" data-options="onChange:changeBeginDate,onSelect:userSelect"/>
			<label><input name="beginDateType" type="radio" value="thisMonth"/>当月 </label> 
			<label><input name="beginDateType" type="radio" value="threeMonth"/>三月</label> 
			<label><input name="beginDateType" type="radio" value="thisYear"/>当年</label> 
			<label><input name="beginDateType" type="radio" value="all"/>全部 </label>
       	</form>
		 <div id="report1" style="width:1100px;height:500px;"></div>
	</div>

	<div style="height:5px"></div>
	<div id="quantDetailPanel" class="easyui-panel" title="详细图" style="width:100%;" 	data-options="collapsible:true">
		字段选择：
		<select id="detailColumn" class="easyui-combobox" name="columnSelect" data-options="onChange:changeQuantDetailColumn">
			<c:forEach items="${quantModelCols}" var="item" varStatus="status">
				<option value="${item.fieldName}" <c:if test="${status.index==0}">selected</c:if> >${item.name}</option>   
			</c:forEach>
		</select>
		<div id="report2" style="width:1100px;height:500px;"></div>
	</div>

</body>
</html>